package com.yjt.admin.system.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yjt.admin.system.entity.GroupType;
import com.yjt.admin.system.dao.GroupTypeMapper;
import com.yjt.admin.system.param.GroupTypeParam;
import com.yjt.admin.system.service.GroupTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yjt.admin.system.vo.GroupTypeVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 群组类别表 服务实现类
 * </p>
 *
 * @author zzp
 * @since 2021-10-13
 */
@Service
public class GroupTypeServiceImpl extends ServiceImpl<GroupTypeMapper, GroupType> implements GroupTypeService {

    @Resource
    private GroupTypeMapper groupTypeMapper;

    @Override
    public GroupTypeVO getOneGroupType(String groupTypeId) {
        return groupTypeMapper.findOneGroupType(groupTypeId);
    }

    @Override
    public IPage<GroupTypeVO> getPageGroupType(GroupTypeParam groupTypeParam) {
        return groupTypeMapper.findPageGroupType(groupTypeParam.toPage(),groupTypeParam);
    }
}
